using INTEX.DataBase;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
namespace WPFExcelReport
{
    public partial class VGMF02 : ViewModelBase
    {  
               
        public CollectionView vwFMKRF
        {
            get
            {
                return (CollectionView)CollectionViewSource.GetDefaultView(SetProd.Tables["ICC_MKRF"]);
            }
        }
        
        private DataRowView _dwFMKRF = null;
        public DataRowView dwFMKRF
        {
            get
            {
                return _dwFMKRF;
            }
            set
            {
                _dwFMKRF = value;
                OnPropertyChanged("dwFMKRF", value);
            }
        } 
        public CollectionView vwVKPMKRF
        {
            get
            {
                return (CollectionView)CollectionViewSource.GetDefaultView(SetEnv.Tables["ICC_MKRF"]);
            }
        }
        
        private DataRowView _dwVKPMKRF = null;
        public DataRowView dwVKPMKRF
        {
            get
            {
                return _dwVKPMKRF;
            }
            set
            {
                _dwVKPMKRF = value;
                OnPropertyChanged("dwVKPMKRF", value);
            }
        } 
        public CollectionView vwVKKMKRF
        {
            get
            {
                return (CollectionView)CollectionViewSource.GetDefaultView(SetData.Tables["ICC_MKRF"]);
            }
        }
        
        private DataRowView _dwVKKMKRF = null;
        public DataRowView dwVKKMKRF
        {
            get
            {
                return _dwVKKMKRF;
            }
            set
            {
                _dwVKKMKRF = value;
                OnPropertyChanged("dwVKKMKRF", value);
            }
        } 

        private bool _IsICC_MKRF; public bool IsICC_MKRF { get { return _IsICC_MKRF; } set { _IsICC_MKRF = value; OnPropertyChanged("IsICC_MKRF", value); } }
       
    
        public DelegateCommand QueryCommand { get; set; }
        public DelegateCommand DeleteCommand { get; set; }
        public DelegateCommand SaveCommand { get; set; }
        public DelegateCommand CopyCommand { get; set; } 
        public VGMF02()
            : base()
        {
            switch (app.company)
            {
                default:
                case "YCC":
                case "YGR":
                    SetEnv = new YGRDB();
                    SetData = new YGRDB();
                    SetProd = new YGRDB();
                    break; 
            }
            TableName = "ICC_MKRF";
            TBMain = SetData.Tables[TableName];
            QueryCommand = new DelegateCommand(x => Query(null));
            DeleteCommand = new DelegateCommand(x => Delete(null));
            SaveCommand = new DelegateCommand(x => Save(null));
            CopyCommand = new DelegateCommand(x => Copy(null));
            if (app.User.Trim() == "ITXV")
            {
              
            }
        }
        ~VGMF02()
        {

        }

 
    }
}
